<@_model id=id>
	<#assign a=object/>
	<#if (object.parentId)??><#assign parentId=object.parentId/></#if>
</@_model>
<form method="post" action="cmsModel/save.do?callbackType=closeCurrent&navTabId=cmsModel/list" class="pageForm required-validate" onsubmit="return validateCallback(this, navTabAjaxDone);">
	<input name="modelId" type="hidden" value="${id!}" />
	<input name="parentId" type="hidden" value="${parentId!}" />
	<div class="formBar">
		<ul>
			<li><button type="submit" class="buttonActive">保存</button></li>
			<li><button type="button" class="button close">关闭</button></li>
		</ul>
	</div>
	<div class="pageFormContent" layoutH="60">
		<fieldset>
			<legend>模型属性</legend>
			<dl class="nowrap">
				<dt>模型编码:</dt>
				<dd>
					<input class="required" name="id" type="text" maxlength="20" size="20" value="${(a.id)!}"/>
				</dd>
			</dl>
			<dl class="nowrap">
				<dt>模型名称:</dt>
				<dd>
					<input class="required" name="name" type="text" maxlength="20" size="20" value="${(a.name)!}"/>
					<label>
						<input name="onlyUrl" type="checkbox" onclick="if($(this).is(':checked')){$('.onlyUrl',navTab.getCurrentPanel()).hide();$('.onlyUrl input[type=text]',navTab.getCurrentPanel()).val('');}else{$('.onlyUrl').show();}"/>
						链接
					</label>
					<label class="onlyUrl"><input name="hasChild" type="checkbox"/>拥有子模型</label>
					<label class="onlyUrl"><input name="hasImages" type="checkbox"/>拥有图片列表</label>
					<label class="onlyUrl"><input name="hasFiles" type="checkbox"/>拥有附件列表</label>
				</dd>
			</dl>
		<#if site.useStatic>
			<dl class="onlyUrl nowrap">
				<dt>默认模板路径:</dt>
				<dd>
					<input name="templatePath" type="text" maxlength="200" size="30" value="${(a.templatePath)!}"/>
					<a class="btnLook" href="cmsTemplate/lookup.html?field=templatePath" lookupGroup="">选择默认静态化模板路径</a>
					<span class="info">
						静态化过程以分类与模型映射模板路径为准，此处选择仅为简化后面操作，
					</span>
				</dd>
			</dl>
		</#if>
		<#if a?has_content>
			<script>
			<#if a.hasChild>
				$('input[name=hasChild]',navTab.getCurrentPanel()).click();
			</#if>
			<#if a.onlyUrl>
				$('input[name=onlyUrl]',navTab.getCurrentPanel()).click();
			</#if>
			<#if a.hasImages>
				$('input[name=hasImages]',navTab.getCurrentPanel()).click();
			</#if>
			<#if a.hasFiles>
				$('input[name=hasFiles]',navTab.getCurrentPanel()).click();
			</#if>
			</script>
		</#if>
		</fieldset>
<#if a?has_content>
	<#assign contentExtendList=a.extendList![]>
</#if>
		<fieldset>
			<legend>内容扩展字段</legend>
			<#include "../include_page/extends.html"/>
			<@extends 'extendList' contentExtendList![]/>
		</fieldset>
	</div>
</form>